<?php
/* @var $this Controller */
$baseUrl = Yii::app()->urlManager->baseUrl;
?>
<!DOCTYPE html>
<html>
    <head>
    	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<meta name="language" content="en" />
    
    	<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/bootstrap/bootstrap.min.css" />
    	<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/bootstrap/bootstrap-theme.min.css" />
    	
    	<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/common.css" />
    	
    	
    	<meta name="description" content="A sidebar menu as seen on the Google Nexus 7 website" />
		<meta name="keywords" content="google nexus 7 menu, css transitions, sidebar, side menu, slide out menu" />
		<meta name="author" content="Codrops" />
		  
		<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl; ?>/css/gn-menu.css" />
		<script src="<?php echo $baseUrl; ?>/js/modernizr.custom.js"></script>
    	
    	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
    </head>

    <body>
    
    	<div class="container">
    	
			<ul id="gn-menu" class="gn-menu-main">
				<li class="gn-trigger">
					<a class="gn-icon gn-icon-menu"><span>Меню</span></a>
					<nav class="gn-menu-wrapper">
						<div class="gn-scroller">
							<ul class="gn-menu">
								<li class="gn-search-item">
									<input placeholder="Search" type="search" class="gn-search">
									<a class="gn-icon gn-icon-search"><span>Поиск</span></a>
								</li>
								<li>
									<a class="gn-icon gn-icon-download">Загрузки</a>
									<ul class="gn-submenu">
										<li><a class="gn-icon gn-icon-illustrator">Векторные иллюстрации</a></li>
										<li><a class="gn-icon gn-icon-photoshop">Photoshop файлы</a></li>
									</ul>
								</li>
								<li><a class="gn-icon gn-icon-cog">Настройки</a></li>
								<li><a class="gn-icon gn-icon-help">Помощь</a></li>
								<li>
									<a class="gn-icon gn-icon-archive">Активность</a>
									<ul class="gn-submenu">
										<li><a class="gn-icon gn-icon-article">Метки</a></li>
										<li><a class="gn-icon gn-icon-pictures">Изображения</a></li>
										<li><a class="gn-icon gn-icon-videos">Видео</a></li>
									</ul>
								</li>
							</ul>
						</div><!-- /gn-scroller -->
					</nav>
				</li>
				<li><a href="/">ЛОГО</a></li>
				
				<?php if(!Yii::app()->user->isGuest):?>
				<li class="rigth"><a href="<?php echo Yii::app()->user->url;?>">Мой кабинет</a></li>
				<li class="rigth"><a href="/site/logout">Выход</a></li>
				<?php else:?>
				<li class="rigth"><a class="codrops-icon codrops-icon-prev" href="/registration/"><span>Регистрация</span></a></li>
				<li class="rigth"><a class="codrops-icon codrops-icon-drop " href="/site/login/"><span>Вход</span></a></li>
				<?php endif;?>
				
			</ul>
			
			
			<header>
				<?php if(Yii::app()->request->url == '/'):?>
				<h1>Шапочка на главной</h1>	
				<?php else:?>
				<h1>Шапочка на остальных страницах</h1>
				<?php endif;?>
			</header> 
			
			<div class="wrap"><?php echo $content; ?></div>
			
		</div><!-- /container -->
		
		
		<script type="text/javascript" src="<?php echo $baseUrl; ?>/js/jquery/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="<?php echo $baseUrl; ?>/js/bootstrap/bootstrap.min.js"></script>
        
        <!-- FOR AUTOCOMPLITE -->
        <script type="text/javascript" src="<?php echo $baseUrl; ?>/js/bootstrap/typeahead.min.js"></script>
        
        <script type="text/javascript" src="<?php echo $baseUrl; ?>/js/common.js"></script>
		
		<script type="text/javascript" src="<?php echo $baseUrl; ?>/js/classie.js"></script>
		<script type="text/javascript" src="<?php echo $baseUrl; ?>/js/gnmenu.js"></script>
		<script>
			new gnMenu( document.getElementById('gn-menu') );

			var TOKEN = '<?php echo Yii::app()->request->csrfToken;?>';
        	var TOKEN_NAME = '<?php echo Yii::app()->request->csrfTokenName;?>';
        	var BASE_URL = '<?php echo $baseUrl;?>';
		</script>
    
    </body>
</html>